package boot.spring.rabbitMQ.listener;

import java.io.IOException;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import boot.spring.po.Mail;



@Component
public class TopicListener2 {

	@RabbitListener(queues = "topicqueue2")
	public void displayTopic(Mail mail) throws InterruptedException {
		Thread.sleep(1000L);
		System.out.println("customer2从topicqueue2取出消息"+mail.toString());
	}
}
